#include "mydialog.h"
#include "ui_mydialog.h"

MyDialog::MyDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MyDialog)
{
    ui->setupUi(this);
}

MyDialog::~MyDialog()
{
    delete ui;
}

void MyDialog::setContent(QString content)
{

    ui->label->setText(content);
}

void MyDialog::setType(int type)
{
    if(type == typeOk){
        ui->label->setStyleSheet("background:rgb(0, 150, 0)");
    }else if(type == typeFail){
        ui->label->setStyleSheet("background:rgb(255, 0, 0)");
    }else{
        ui->label->setStyleSheet("background:rgb(255, 255, 255)");
    }
}
